#ifndef __CONDITION_H__ 
#define __CONDITION_H__
#include "MutexLock.hpp"
#include <pthread.h>
#include "Noncopyable.hpp"

namespace wd{

class Condition : public Noncopyable{

public:
    Condition(MutexLock & mutex);
    ~Condition();
    void wait();
    void notifyOne();
    void notifyAll();



private:
    pthread_cond_t _cond;
    MutexLock &    _mutex;
};

}

#endif

